<template>
  <div>
    <p>{{ srcb }}</p>
    <button @click="btn">颠倒</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      srcb: "Hello,World",
    };
  },
  methods: {
    btn() {
      let arr = this.srcb.split("");
      let reArr = arr.reverse();
      let theStr = reArr.join("");
      this.srcb = theStr;
    },
  },
};
</script>

<style>
</style>